how to use fill method in JavaScript